using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using DTO;
namespace DAO
{
    public class MayBayDAO
    {
        public static bool HienThiLoaiMayBay(List<DTO.MayBay> tenmb)
        {
            string sql = "Select * from MayBay";
            DataTable dt = Config.AccessHelper.ExecuteQuery(sql);
            if (dt != null)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    DTO.MayBay mb = new DTO.MayBay();
                    mb.MaLoaiMayBay = int.Parse(dt.Rows[i].ItemArray[0].ToString());
                    mb.TenLoaiMayBay= dt.Rows[i].ItemArray[1].ToString();
                    tenmb.Add(mb);
                }
                return true;
            }
            return false;
        }
    }
}
